<script setup lang="ts">
  import { nextTick, provide, ref } from "vue";
  import { RouterView } from 'vue-router'

  const flag = ref(true)
  const reload = () => {
      flag.value = false
      nextTick(() => {
          flag.value = true
      })
  }
  // APP.vue提供重新加载页面的方法，需要刷新页面的vue通过inject reload方法进行刷新
  provide("reload", reload)
</script>

<template>
  <RouterView v-if="flag"/>
</template>

<style scoped>
</style>
